package system

import "github.com/gogf/gf/v2/frame/g"

type AuthorityRouteListReq struct {
	g.Meta `path:"/system/authority/routes" tags:"系统管理-授权" method:"get" summary:"系统已注册的API路由列表" description:"系统注册的API路由列表，通过 g.Server().GetOpenApi() 相关接口返回"`
}
type AuthorityRouteListRes struct {
	Routes interface{} `json:"routes"`
}

type AuthorityRoleBindPermissionReq struct {
	g.Meta        `path:"/system/authority/roleBindPermission" tags:"系统管理-授权" method:"POST" summary:"角色关联权限" description:"允许角色直接关联权限，使其角色可以直接获取某个权限接口"`
	RoleId        int64   `v:"required"`
	PermissionIds []int64 `v:"required"`
}
type AuthorityRoleBindPermissionRes struct {
}

type AuthorityDetailReq struct {
	g.Meta `path:"/system/authority/detail" tags:"系统管理-授权" method:"GET" summary:"获取已登录用户权限数据" description:"获取已登录用户权限数据，包括用户基本信息、有权限的菜单栏CODE和权限CODE"`
}
type AuthorityDetailRes struct {
	ID          int64    `json:"id"`
	Username    string   `json:"username"`
	Name        string   `json:"name"`
	Phone       string   `json:"phone"`
	Menus       []string `json:"menus"`
	Permissions []string `json:"permissions"`
}
